#include "xlcomm/base/condition_latch.h"

namespace xlcomm {

ConditionLatch::ConditionLatch() : finish_(false) {}

void ConditionLatch::Wait() {
  std::unique_lock<std::mutex> lock(mutex_);
  while (!finish_) {
    condition_.wait(lock);
  }
}

}  // namespace xlcomm